<template>
	<view>
		<view class="bg-main text-white flex align-center justify-center font-md py-2 rounded-circle"
			hover-class="bg-main-hover" @click="logout">退出登录</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			logout() {
				uni.showModal({
					title: '提示',
					content: '是否确定退出登录',
					success: async res => {
						if (res.confirm) {
							await this.$store.dispatch('logout')
						}
					},
					fail: () => {},
				});
			}
		}
	}
</script>

<style>

</style>
